﻿<%@ Page Title="Ngôi nhà nhỏ - Tin tức" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="PostList.aspx.cs" Inherits="Interface.Posts.PostList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="le-co-menu">
        <div class="le-co-ti-color">
            <div class="le-co-hi-title"> TIN TỨC</div>
        </div>
        <div id="gridHouse">
            <asp:GridView ID="gridPost" runat="server" EnableViewState="true" CssClass="listTin"
            AllowPaging="True" PageSize = "4" AllowSorting="True"
            AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="ID" 
            ShowFooter="true" >  
            <Columns>
                <asp:TemplateField> 
                    <ItemTemplate>
                        
                            <table width="100%" border="0">
                                <tbody>
                                    <tr>
                                        <td width="20%" rowspan="2">
                                            <asp:Image ID="imgPost" runat="server" Height="70px" ImageUrl='<%# Eval("Image") %>' Width="100px"/>     
                                        </td>
                                        <td width="80%">
                                            <a href="/Posts/PostDetails.aspx?ID=<%#DataBinder.Eval(Container.DataItem, "ID")%>"><asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>' ></asp:Label></a>  
                                        </td>                                            
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblDes" runat="server" Text='<%# Eval("Description") %>' ></asp:Label>                                        
                                        </td>
                                    </tr> 
                                </tbody>
                            </table>
                        <%--</div>--%>
                        <div class="small-pace">
                        </div>
                    </ItemTemplate>  
                </asp:TemplateField>
            </Columns>              
            </asp:GridView>     
        </div>        
    </div>
    <asp:ImageButton ID="btnAddPost" ImageUrl="~/Images/Icon/add-button.png" runat="server" Visible="false"
    onclick="btnAddPost_Click" />
</asp:Content>
